/* *******************************************************************************
 *      Copyright:  (C) 2025 ZYT
 *                  All rights reserved.
 *    
 *       Filename:  main.h
 *    Description:  This file 
 *       
 *        Version:  1.0.0(27/03/25)
 *         Author:  Zhang yuting <zhangyuting@163.com>
 *      ChangeLog:  1, Release initial version on "27/03/25 16:14:46"
 *                            
 *********************************************************************************/
#ifndef _MAIN_H_
#define _MAIN_H_

#include <signal.h>
#include <unistd.h>
#include <getopt.h>
#include <stdlib.h>
#include <libgen.h>
#include <string.h>

#include "sqlite.h"
#include "socket.h"
#include "client_func.h"
#include "ds18b20.h"
#include "logger.h"
#include "pack.h"

#define CONFIG_DEBUG
#ifdef CONFIG_DEBUG
#define dbg_printf(format, args...) printf(format, ##args)
#else
#define dbg_printf(format, args...) do{} while(0)
#endif

void program_stop(int sigsum);
void handle_pipe(int sig);

int g_prog_stop = 0;

#endif


